package com.hiyee.admin.service.impl;

import com.hiyee.admin.mapper.AdminUserMapper;
import com.hiyee.admin.service.AdminUserService;
import com.hiyee.admin.service.BaseService;
import com.hiyee.pojo.AdminUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;
@Service
public class AdminUserServiceImpl extends BaseService implements AdminUserService {

    @Autowired
    private AdminUserMapper adminUserMapper;

    @Override
    public AdminUser getByUsername(String username) {
        Example example = new Example(AdminUser.class);
        Example.Criteria criteria = example.createCriteria();
        criteria.andEqualTo("username", username);
        return adminUserMapper.selectOneByExample(example);
    }
}
